package abio.XasML.event
{
	import flash.events.EventDispatcher;

	public class centralDispatcher extends EventDispatcher
	{
		public function centralDispatcher()
		{
			if(centralDispatcher.bCreating==false){
				throw('CentralDispatcher can have only one instance');
			}
		}

		static private var Singleton:centralDispatcher=null;
		static private var bCreating:Boolean=false;
		static public function getInstance():centralDispatcher
		{
			if(centralDispatcher.Singleton==null)
			{
				centralDispatcher.bCreating=true;
				centralDispatcher.Singleton=new centralDispatcher();
				centralDispatcher.bCreating=false;
			}
			return centralDispatcher.Singleton;
		}
	}
}